<template>
	<view style="padding: 10px;">
		<view>let scope = "base_info,auth_user"</view>
		<button size="mini" @click="toLogin">加载登陆界面</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				weburl: ""
			}
		},
		onLoad() {

		},
		methods: {
			toLogin() {
				let base_url = "https://app.zwfw.nmg.gov.cn:4443/icity/auth2.0/authorize"
				let app_id = "c1ae62fe-9cb8-4fb9-9ba7-ad1ae0a4ad34"
				// let redirect_uri = "https://m.zhaoyj.work/msb/#/pages/login/result"
				let redirect_uri = "https://static-mp-67dcfd0c-c143-49dd-81a6-3d6aabd6ef7b.next.bspapp.com/msb/#/pages/login/result"
				// let redirect_uri = "https://app.zwfw.nmg.gov.cn/mengsuban-doc-online/index.html"
				let scope = "base_info,auth_user"
				let state = ""
				this.weburl =
					`${base_url}?app_id=${app_id}&redirect_uri=${encodeURIComponent(redirect_uri)}&scope=${scope}&state=${state}`
				console.log("weburl====", this.weburl)
				window.location = this.weburl
			}
		}
	}
</script>

<style>

</style>
